/*
 * @Author: zhao 13370229059@163.com
 * @Date: 2024-04-25 10:29:45
 * @LastEditors: zhao 13370229059@163.com
 * @LastEditTime: 2024-12-18 23:03:50
 * @FilePath: \dance\mixin\myMixin.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { shareList } from '@/common/js/global';
import { suiji } from '@/common/js/fn.js';
export default {
  async shareTimeline() {
    let pages = uni.$uv.pages();
    let url = pages[pages.length - 1]?.$page?.fullPath || '';
    const { miniProgram } = uni.getAccountInfoSync();
    let { envVersion } = miniProgram;
    let random = await suiji(0, shareList.length - 1);
    let title = (envVersion === 'release' ? '' : '测试') + '去卡' + shareList[random].name;
    title += `#快来一起跳舞吧~`;
    return {
      title,
      query: `${url.split('?')[1]}&isSharePyq=1`
    };
  }
};
